import 'dart:convert';

import 'package:dio/dio.dart';
import 'package:group_bargain/dytt/DyttApi.dart';

class DyttRequest {
  static getNewMovie() async {
    var options = BaseOptions(
      connectTimeout: 15000,
      receiveTimeout: 15000,
      responseType: ResponseType.plain,
      baseUrl: DyttApi.base_url,

//      contentType: ContentType('application', 'x-www-form-urlencoded', charset: 'utf-8'),
    );
    Dio _dio = Dio(options);
    Map<String, dynamic> headersMap = new Map();
    headersMap.putIfAbsent("User-Agent", () =>  DyttApi.AGENT_NAME);
    var response = await _dio.request(DyttApi.new_movie);
    print("DyttRequest:"+response.request.uri.toString());
    Utf8Decoder utf8decoder = new Utf8Decoder();
    print("getNewMovie:"+response.data.toString());
  }
}
